﻿{% extends 'inquire/base.html' %}

{% block title %}
    资产转移区
{% endblock %}

{% block startbody %}
    {#按房间进行转移后的显示部分#}
    <div class="container">
        <div class="page-header">
            <h1>{{ sc_obj.room.tower.name }}号楼{{ sc_obj.room.floor.name }}层{{ sc_obj.room.room }}房间,资产名称：{{ sc_obj.goods.name }},数量：{{ sc_obj.number }},单位：{{ sc_obj.unit }}</h1>
        </div>
        <p class="lead">Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom
            HTML and CSS. A fixed navbar has been added with <code>padding-top: 60px;</code> on the <code>body &gt;
                .container</code>.</p>
        <p>Back to <a href="#">the default sticky footer</a> minus the navbar.</p>
    </div>

    {#转移部分显示#}
    <div class="container">
        <div class="row">
            <form action='#' method='post'>
                {% csrf_token %}
                <input type='hidden' value="{{ sc_obj.id }}" name='sc_obj_id'>
                <div class="form-group col-md-4">
                    <label for="exampleInputEmail1">要转移到的房间：</label>
                    <select class="form-control" id="exampleInputEmail1" name="room">
                        {% for id,name in all_room.items %}
                            <option value='{{ id }}'>{{ name }}</option>
                        {% endfor %}
                    </select>
                </div>

                <div class="form-group col-md-4">
                    <label for="exampleInputEmail1">保管人：</label>
                    <select class="form-control" id="exampleInputEmail1" name="user">
                        {% for user in all_user %}
                            <option value='{{ user.id }}'>{{ user.name }}</option>
                        {% endfor %}
                    </select>
                </div>

                <div class="form-group col-md-3">
                    <label for="exampleInputEmail1">转移数量：</label>
                    <input type="number" class="form-control" id="exampleInputEmail1" name="number">
                </div>

                <div class="form-group col-md-1">
                    <label for="exampleInputEmail1">单位：</label>
                    <input disabled="disabled" type="text" class="form-control" id="exampleInputEmail1"
                           value="{{ sc_obj.unit }}">
                    <input type="hidden" name="unit" value="{{ sc_obj.unit }}">
                </div>

                <button type="submit" class="btn btn-default">Submit</button>
            </form>
        </div>
    </div>
{% endblock %}
